home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
serial
/
callback.001
/
callback~
/
callback
/
login
/
login.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-22
|
845b
|
28 lines
#include "cblogin.h"
void login(char *name)
{
int
state,
uid;
switch (getstate(&state, &uid)) /* do appropriate task */
{
case -2: /* this shouldn't happen: cbmgetty */
/* should have forced the enable- */
/* state */
log(log_off, "Unexpected force-enable state");
enable_state(); /* make the enable-state */
/* FALLING THROUGH */
case -1:
first_login(name); /* state ok: first login */
break;
case 0:
default: /* default: callback attempt, */
exec_login(uid); /* run original login */
}
}